home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / bash-1.12 / dist / filecntl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-07-07  |  468 b   |  19 lines

  1. /* filecntl.h - Definitions to set file descriptors to close-on-exec. */
  2.  
  3. #if !defined (_FILECNTL_H_)
  4. #define _FILECNTL_H_
  5.  
  6. #include <fcntl.h>
  7.  
  8. /* Definitions to set file descriptors to close-on-exec, the Posix way. */
  9. #if !defined (FD_CLOEXEC)
  10. #define FD_CLOEXEC     1
  11. #endif
  12.  
  13. #define FD_NCLOEXEC    0
  14.  
  15. #define SET_CLOSE_ON_EXEC(fd)  (fcntl ((fd), F_SETFD, FD_CLOEXEC))
  16. #define SET_OPEN_ON_EXEC(fd)   (fcntl ((fd), F_SETFD, FD_NCLOEXEC))
  17.  
  18. #endif /* ! _FILECNTL_H_ */
  19.